<div bsModal #editHomepage="bs-modal" class="modal fade addNew" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel"
    aria-hidden="true">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title pull-left">首页弹窗-编辑</h4>
                <button type="button" class="close pull-right" (click)="editHomepage.hide()" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body clearFix">
                <div class="modal-line">
                    <span style="opacity: 0;">*</span>
                    <span class="modal-line-title"></span>
                    <div class="modal-img">
                        <img src="{{edit.imageUrl}}" alt="">
                    </div>
                </div>
                <div class="modal-line">
                    <span style="color: red;">*</span>
                    <span class="modal-line-title">图片</span>
                    <div style="display: inline-block;">
                        <button class="action-btn" (click)="openSelectImageModal()">从图片库选择</button>
                        <span>或</span>
                        <a class="action-btn">浏览
                            <input type="file" ng2FileSelect class="inputFile" [uploader]="uploader" (change)="selectedFileOnChanged($event)" />
                        </a>
                        <button class="action-btn" (click)="uploadFile(uploader.queue[0])">上传</button>
                    </div>
                </div>
                <div class="modal-line">
                    <span style="color: red;">*</span>
                    <span class="modal-line-title">名称</span>
                    <input type="text" class="form-control inp" [(ngModel)]="edit.pageName" required>
                </div>
                <div class="modal-line homePage-header">
                    <span style="color: red;">*</span>
                    <span class="modal-line-title" style="width: auto;">弹窗类型</span>
                    <select name="" id="" class="sel" [(ngModel)]="edit.homePageType">
                        <option value="1">APP激活</option>
                        <option value="2">普通弹窗</option>
                    </select>
                </div>
                <div class="modal-line homePage-header">
                    <span style="color: red; opacity: 0;">*</span>
                    <span class="modal-line-title" style="width: auto;">跳转类型</span>
                    <select name="" id="" class="sel" [(ngModel)]="edit.redirectingType">
                        <option value="-1">无需跳转</option>
                        <option value="{{opt.id}}" *ngFor="let opt of redirectingOptions">{{opt.name}}</option>
                      </select>
                </div>
                <div class="modal-line">
                    <span style="color: red; opacity: 0;">*</span>
                    <span class="modal-line-title">跳转目标</span>
                    <input type="text" class="form-control inp" [(ngModel)]="edit.redirectingValue" required>
                </div>
                <div class="modal-line">
                    <span style="opacity: 0;">*</span>
                    <span class="modal-line-title"></span>
                    <button class="confirm-btn modal-line-add" (click)="saveHomepage()">确认</button>
                </div>
            </div>
        </div>
    </div>
</div>
<app-select-image-edit #selectEditImage (SelectImage)="SelectImage($event)"></app-select-image-edit>